#coding=utf-8

require "aio/core"

class Aio::Module::Cmd::H3C::DisplayClock < Aio::Module::Cmd::H3C
	include Aio::Module
	
	def initialize
		super({
			:cmd_full			=> "display clock",
			:cmd_short		=> "dis clo",
			:author				=> "Elin",
			:description	=> "This is H3C Command# display clock",
			:ranking			=> Ranking_1,
			:platform			=> "all",
		})
	end

	def parse
		context = self.context.dup
		clock = {}
		useful[:clock] = clock
		context.readline_match_block(/(?<time>[^\s]+) (?<zone>[^\s]+) (?<week>[^\s]+) (?<month>\d+)\/(?<day>\d+)\/(?<year>\d+)/) do |block|
			block.update(clock, :time)
			block.update(clock, :zone)
			block.update(clock, :week)
			block.update(clock, :year)
			block.update(clock, :month)
			block.update(clock, :day)
		end
	end
end
